#include "stdafx.h"

#include "..\WinStatic.h"
using namespace TddGui;

#include "WindowUtils.h"

namespace Slow
{
TESTCLASS(WinStaticTests)
{
	TESTMETHOD(SetTextTest)
	{
		WinStatic win;
		WindowDestroyer wd = win.Create(NULL);

		TextNotification& tn = win;
		tn.SetText(L"hi");

		CString cs;
		win.GetWindowText(cs);
		TddAssert().AreEqual(L"hi", cs);
	}
	TESTMETHOD(SubclassTest)
	{
		WinStatic win1;
		HWND hwnd = win1.Create(NULL);
		WindowDestroyer wd = hwnd;

		WinStatic win2;
		win2.Init(hwnd);

		TddAssert().AreEqual((long)hwnd, (long)win2.m_hWnd);
	}
};
}